home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Misc / DLL / l / Screen
Text File  |  1995-04-15  |  33KB  |  1,652 lines

  1.      1   
  2.     16  
  3.     16  
  4.     16  
  5.     16  
  6.     16  
  7.     16  
  8.     16  
  9.     16  
  10.     16  
  11.     16  
  12.     16  
  13.     16  
  14.     16  
  15.     16  
  16.     16  
  17.     17   
  18.      2  
  19.      3  
  20.      4  
  21.      5   
  22.      2  
  23.      3  
  24.      4  
  25.      5  
  26.      6  
  27.      7  
  28.      8  
  29.      9  
  30.     10  
  31.     11  
  32.     12  
  33.     13  
  34.     14  
  35.     15  
  36.     16  typedef struct
  37.     17  {
  38.     18  int errnum;
  39.     19  char errmess[252];
  40.     20  } os_error;
  41.     21  
  42.     22  
  43.     23  
  44.     24  
  45.     25  
  46.     26  
  47.     27  
  48.     28  
  49.     29  
  50.     30  
  51.     31  
  52.     32  
  53.     33  
  54.     34  
  55.     35  
  56.     36  
  57.     37  
  58.     38  
  59.     39  
  60.     40  
  61.     41  
  62.     42  
  63.     43   
  64.      8  
  65.      8  
  66.      8  
  67.      8  
  68.      8  
  69.      8  
  70.      8  
  71.      9  
  72.     10  
  73.     11  
  74.     12   
  75.     13  
  76.     14  
  77.     15  
  78.     17  
  79.     18  
  80.     19    
  81.      1  ___toplevel 
  82.      1  
  83.      2  
  84.      3   
  85.      7  
  86.      7  
  87.      7  
  88.      7  
  89.      8  
  90.      9  
  91.     10  
  92.     11  
  93.     12  
  94.     13     typedef unsigned int size_t;    
  95.     14  
  96.     15  
  97.     16  typedef struct {
  98.     17     int r[10];             
  99.     18  } _kernel_swi_regs;
  100.     19  
  101.     20  typedef struct {
  102.     21     int load, exec;        
  103.     22     int start, end;        
  104.     23  } _kernel_osfile_block;
  105.     24  
  106.     25  typedef struct {
  107.     26     void * dataptr;        
  108.     27     int nbytes, fileptr;
  109.     28     int buf_len;           
  110.     29     char * wild_fld;       
  111.     30  } _kernel_osgbpb_block;
  112.     31  
  113.     32  typedef struct {
  114.     33     int errnum;            
  115.     34     char errmess[252];     
  116.     35  } _kernel_oserror;
  117.     36  
  118.     37  typedef struct stack_chunk {
  119.     38     unsigned long sc_mark;        
  120.     39     struct stack_chunk *sc_next, *sc_prev;
  121.     40     unsigned long sc_size;
  122.     41     int (*sc_deallocate)();
  123.     42  } _kernel_stack_chunk;
  124.     43  
  125.     44  extern _kernel_stack_chunk *_kernel_current_stack_chunk(void);
  126.     45  
  127.     46  extern void _kernel_setreturncode(unsigned code);
  128.     47  
  129.     48  extern void _kernel_exit(int);
  130.     49  
  131.     50  extern void _kernel_raise_error(_kernel_oserror *);
  132.     51   
  133.     52  
  134.     53  extern void _kernel_exittraphandler(void);
  135.     54  
  136.     55  
  137.     56  
  138.     57  
  139.     58  
  140.     59  
  141.     60  
  142.     61  
  143.     62  
  144.     63  
  145.     64  
  146.     65  
  147.     66  extern int _kernel_hostos(void);
  148.     67   
  149.     70  
  150.     70  
  151.     70  
  152.     71  extern int _kernel_fpavailable(void);
  153.     72   
  154.     75  
  155.     75  
  156.     75  
  157.     76  
  158.     77  extern _kernel_oserror *_kernel_swi(int no, _kernel_swi_regs *in,
  159.     78                                     _kernel_swi_regs *out);
  160.     79   
  161.     85  
  162.     85  
  163.     85  
  164.     85  
  165.     85  
  166.     85  
  167.     86  extern _kernel_oserror *_kernel_swi_c(int no, _kernel_swi_regs *in,
  168.     87                                        _kernel_swi_regs *out, int *carry);
  169.     88   
  170.     93  
  171.     93  
  172.     93  
  173.     93  
  174.     93  
  175.     94  extern char *_kernel_command_string(void);
  176.     95   
  177.     98  
  178.     98  
  179.     98  
  180.     99   
  181.    108  
  182.    108  
  183.    108  
  184.    108  
  185.    108  
  186.    108  
  187.    108  
  188.    108  
  189.    108  
  190.    109  
  191.    110  
  192.    111  extern int _kernel_osbyte(int op, int x, int y);
  193.    112   
  194.    122  
  195.    122  
  196.    122  
  197.    122  
  198.    122  
  199.    122  
  200.    122  
  201.    122  
  202.    122  
  203.    122  
  204.    123  extern int _kernel_osrdch(void);
  205.    124   
  206.    127  
  207.    127  
  208.    127  
  209.    128  extern int _kernel_oswrch(int ch);
  210.    129   
  211.    133  
  212.    133  
  213.    133  
  214.    133  
  215.    134  extern int _kernel_osbget(unsigned handle);
  216.    135   
  217.    139  
  218.    139  
  219.    139  
  220.    139  
  221.    140  extern int _kernel_osbput(int ch, unsigned handle);
  222.    141   
  223.    145  
  224.    145  
  225.    145  
  226.    145  
  227.    146  extern int _kernel_osgbpb(int op, unsigned handle, _kernel_osgbpb_block *inout); 
  228.    153  
  229.    153  
  230.    153  
  231.    153  
  232.    153  
  233.    153  
  234.    153  
  235.    154  extern int _kernel_osword(int op, int *data);
  236.    155   
  237.    160  
  238.    160  
  239.    160  
  240.    160  
  241.    160  
  242.    161  extern int _kernel_osfind(int op, char *name);
  243.    162   
  244.    167  
  245.    167  
  246.    167  
  247.    167  
  248.    167  
  249.    168  extern int _kernel_osfile(int op, const char *name, _kernel_osfile_block *inout);
  250.    169   
  251.    173  
  252.    173  
  253.    173  
  254.    173  
  255.    174  extern int _kernel_osargs(int op, unsigned handle, int arg);
  256.    175   
  257.    181  
  258.    181  
  259.    181  
  260.    181  
  261.    181  
  262.    181  
  263.    182  extern int _kernel_oscli(const char *s);
  264.    183   
  265.    191  
  266.    191  
  267.    191  
  268.    191  
  269.    191  
  270.    191  
  271.    191  
  272.    191  
  273.    192  extern _kernel_oserror *_kernel_last_oserror(void);
  274.    193   
  275.    202  
  276.    202  
  277.    202  
  278.    202  
  279.    202  
  280.    202  
  281.    202  
  282.    202  
  283.    202  
  284.    203  extern _kernel_oserror *_kernel_getenv(const char *name, char *buffer, unsigned size);
  285.    204   
  286.    209  
  287.    209  
  288.    209  
  289.    209  
  290.    209  
  291.    210  extern _kernel_oserror *_kernel_setenv(const char *name, const char *value);
  292.    211   
  293.    215  
  294.    215  
  295.    215  
  296.    215  
  297.    216  extern int _kernel_system(const char *string, int chain);
  298.    217   
  299.    232  
  300.    232  
  301.    232  
  302.    232  
  303.    232  
  304.    232  
  305.    232  
  306.    232  
  307.    232  
  308.    232  
  309.    232  
  310.    232  
  311.    232  
  312.    232  
  313.    232  
  314.    233  
  315.    234  extern unsigned _kernel_alloc(unsigned minwords, void **block);
  316.    235   
  317.    242  
  318.    242  
  319.    242  
  320.    242  
  321.    242  
  322.    242  
  323.    242  
  324.    243  typedef void freeproc(void *);
  325.    244  typedef void * allocproc(unsigned);
  326.    245  
  327.    246  extern void _kernel_register_allocs(allocproc *malloc, freeproc *free);
  328.    247   
  329.    254  
  330.    254  
  331.    254  
  332.    254  
  333.    254  
  334.    254  
  335.    254  
  336.    255  typedef int _kernel_ExtendProc(int  , void**  );
  337.    256  extern _kernel_ExtendProc *_kernel_register_slotextend(_kernel_ExtendProc *proc);
  338.    257   
  339.    264  
  340.    264  
  341.    264  
  342.    264  
  343.    264  
  344.    264  
  345.    264  
  346.    265  extern int _kernel_escape_seen(void);
  347.    266   
  348.    273  
  349.    273  
  350.    273  
  351.    273  
  352.    273  
  353.    273  
  354.    273  
  355.    274  typedef union {
  356.    275      struct {int s:1, u:16, x: 15; unsigned mhi, mlo; } i;
  357.    276      int w[3]; } _extended_fp_number;
  358.    277  
  359.    278  typedef struct {
  360.    279     int r4, r5, r6, r7, r8, r9;
  361.    280     int fp, sp, pc, sl;
  362.    281     _extended_fp_number f4, f5, f6, f7; } _kernel_unwindblock;
  363.    282  
  364.    283  extern int _kernel_unwind(_kernel_unwindblock *inout, char **language);
  365.    284   
  366.    296  
  367.    296  
  368.    296  
  369.    296  
  370.    296  
  371.    296  
  372.    296  
  373.    296  
  374.    296  
  375.    296  
  376.    296  
  377.    296  
  378.    297  extern char *_kernel_procname(int pc);
  379.    298   
  380.    302  
  381.    302  
  382.    302  
  383.    302  
  384.    303  extern char *_kernel_language(int pc);
  385.    304   
  386.    308  
  387.    308  
  388.    308  
  389.    308  
  390.    309   
  391.    319  
  392.    319  
  393.    319  
  394.    319  
  395.    319  
  396.    319  
  397.    319  
  398.    319  
  399.    319  
  400.    319  
  401.    320  extern unsigned _kernel_udiv(unsigned divisor, unsigned dividend);
  402.    321  extern unsigned _kernel_urem(unsigned divisor, unsigned dividend);
  403.    322  extern unsigned _kernel_udiv10(unsigned dividend);
  404.    323  
  405.    324  extern int _kernel_sdiv(int divisor, int dividend);
  406.    325  extern int _kernel_srem(int divisor, int dividend);
  407.    326  extern int _kernel_sdiv10(int dividend);
  408.    327  
  409.    328   
  410.    331  
  411.    331  
  412.    331  
  413.    332  typedef enum { NotHandled, Handled } _kernel_HandledOrNot;
  414.    333  
  415.    334  typedef struct {
  416.    335     int regs [16];
  417.    336  } _kernel_registerset;
  418.    337  
  419.    338  typedef struct {
  420.    339     int regs [10];
  421.    340  } _kernel_eventregisters;
  422.    341  
  423.    342  typedef void (*PROC) (void);
  424.    343  typedef _kernel_HandledOrNot (*_kernel_trapproc) (int code, _kernel_registerset *regs);
  425.    344  typedef _kernel_HandledOrNot (*_kernel_eventproc) (int code, _kernel_registerset *regs);
  426.    345  
  427.    346  typedef struct {
  428.    347     int size;
  429.    348     int codestart, codeend;
  430.    349     char *name;
  431.    350     PROC (*InitProc)(void);
  432.    351     PROC FinaliseProc;
  433.    352     _kernel_trapproc TrapProc;
  434.    353     _kernel_trapproc UncaughtTrapProc;
  435.    354     _kernel_eventproc EventProc;
  436.    355     _kernel_eventproc UnhandledEventProc;
  437.    356     void (*FastEventProc) (_kernel_eventregisters *);
  438.    357     int (*UnwindProc) (_kernel_unwindblock *inout, char **language);
  439.    358     char * (*NameProc) (int pc);
  440.    359  } _kernel_languagedescription;
  441.    360  
  442.    361  typedef int _kernel_ccproc(int, int, int);
  443.    362  
  444.    363  extern int _kernel_call_client(int a1, int a2, int a3, _kernel_ccproc callee);
  445.    364   
  446.    369  
  447.    369  
  448.    369  
  449.    369  
  450.    369  
  451.    370  extern int _kernel_client_is_module(void);
  452.    371   
  453.    375  
  454.    375  
  455.    375  
  456.    375  
  457.    376  extern int _kernel_processor_mode(void);
  458.    377  
  459.    378  extern void _kernel_irqs_on(void);
  460.    379  
  461.    380  extern void _kernel_irqs_off(void);
  462.    381  
  463.    382  extern int _kernel_irqs_disabled(void);
  464.    383   
  465.    384  
  466.    385  extern void *_kernel_RMAalloc(size_t size);
  467.    386  
  468.    387  extern void *_kernel_RMAextend(void *p, size_t size);
  469.    388  
  470.    389  extern void _kernel_RMAfree(void *p);
  471.    390  
  472.    391  
  473.    392   
  474.    393  
  475.     21  
  476.     22  
  477.     23  
  478.     25  
  479.     26   
  480.     27  
  481.     28  typedef void *dll;                       
  482.     29  
  483.     30  typedef struct                           
  484.     31  {
  485.     32    char *name;                            
  486.     33    int version;                           
  487.     34    char *entryNames;                      
  488.     35    void *branchTable;                     
  489.     36  }
  490.     37  dll_table;
  491.     38  
  492.     39  typedef struct                           
  493.     40  {
  494.     41    dll d;                                 
  495.     42    char *name;                            
  496.     43    int version;                           
  497.     44    char *author;                          
  498.     45    unsigned instSize;                     
  499.     46  }
  500.     47  dll_infostr;
  501.     48  
  502.     49   
  503.     67  
  504.     67  
  505.     67  
  506.     67  
  507.     67  
  508.     67  
  509.     67  
  510.     67  
  511.     67  
  512.     67  
  513.     67  
  514.     67  
  515.     67  
  516.     67  
  517.     67  
  518.     67  
  519.     67  
  520.     67  
  521.     68  os_error *dll_find(const char *name,int version,dll *d);
  522.     69  os_error *dll_findFromTable(const dll_table *table,int entries);
  523.     70  os_error *dll_load(void *buffer,const char *name);
  524.     71  os_error *dll_lose(dll d);
  525.     72  os_error *dll_appDying(void);
  526.     73  os_error *dll_giveCLibData(void *data);
  527.     74  os_error *dll_findCLibData(void **p);
  528.     75  os_error *dll_instanceVars(void *buffer,int *size,int *magic);
  529.     76  os_error *dll_setInstanceVars(dll d,void *workspace);
  530.     77  os_error *dll_appData(void);
  531.     78  os_error *dll_readStackPtr(int *sp);
  532.     79  os_error *dll_setStackPtr(int sp);
  533.     80  os_error *dll_nameApp(const char *name);
  534.     81  os_error *dll_info(dll d,dll_infostr *i);
  535.     82  os_error *dll_findEntry(dll d,const char *name,void (**entry)());
  536.     83  os_error *dll_saveHandle(int *handle);
  537.     84  os_error *dll_restoreHandle(int *handle);
  538.     85  os_error *dll_findInstanceVars(dll d,void **addr);
  539.     86  os_error *dll_registerAppEntryTable(void (**btable)(),char *names);
  540.     87  os_error *dll_findAppEntry(char *name,void (**func)());
  541.     88  os_error *dll_setExtensionTable(void (**btable)(),char *names);
  542.     89  
  543.     90   
  544.     91  
  545.     92  
  546.     93  
  547.     94   
  548.     95  
  549.     96  
  550.     97  
  551.     98  void _dll_appspace(void);
  552.     99  void _dll_clibdata(void);
  553.    100  
  554.    101  
  555.    102  
  556.    103  
  557.    104  
  558.    105  
  559.    106  
  560.    107  
  561.    108  
  562.    109  
  563.    110   
  564.    111  
  565.    112  
  566.    113  
  567.    114  int _dll_system(const char *command);
  568.    115  int _dll_ksystem(const char *command,int chain);
  569.    116  os_error *_dll_oscli(const char *command);
  570.    117  os_error *_dll_starttask(const char *command);
  571.    118  
  572.    119  
  573.    120  
  574.    121  
  575.    122  
  576.    123  
  577.    124  
  578.    125  
  579.    126  
  580.    127  
  581.    128   
  582.    129  
  583.    130  dll _dll_loadExtension(const char *name);
  584.    131  void _dll_freeExtension(dll d);
  585.    132  
  586.    133   
  587.    134  
  588.    135  
  589.    136  
  590.    137  int _dll_setjmp(void);
  591.    138  void _dll_longjmped(int sp);
  592.    139  
  593.    140  
  594.    141  
  595.    142  
  596.    143  
  597.    144  
  598.    145  
  599.    146  
  600.    147   
  601.    148  
  602.    149  
  603.    150  
  604.    151  void _dll_giveMemory(void);
  605.    152  
  606.    153  
  607.    154  
  608.    155  
  609.    156  
  610.    157  
  611.    158  
  612.    159   
  613.    160  
  614.    161  
  615.    162  
  616.    163  
  617.    164  
  618.    165  
  619.    166  
  620.    167  
  621.    168  
  622.    169  
  623.    170  
  624.    171  
  625.    172  
  626.    173  
  627.    174  
  628.    175  
  629.    176  
  630.    177  
  631.    178  
  632.    179  
  633.    180  
  634.    181  
  635.    182  
  636.    183  
  637.    184  
  638.     45  
  639.     46  
  640.     47  
  641.     48  
  642.     49  
  643.     50  
  644.     51  
  645.     52  
  646.     53  
  647.      7  
  648.      8  typedef struct
  649.      9  {
  650.     10  int x, y;
  651.     11  } wimp_point;
  652.     12  typedef wimp_point wimp_coord;
  653.     13  typedef struct
  654.     14  {
  655.     15  wimp_point min;
  656.     16  wimp_point max;
  657.     17  } wimp_rect;
  658.     18  typedef wimp_rect wimp_box;
  659.     19  typedef int window_handle;
  660.     20  typedef int icon_handle;
  661.     21  typedef int task_handle;
  662.     22  
  663.     23  
  664.     24  
  665.     25  
  666.     26  
  667.     27  
  668.     28  
  669.     29  
  670.     30  
  671.     31  
  672.     32  
  673.     33  
  674.     34  
  675.     35  
  676.     36  
  677.     37  
  678.     38  
  679.     39  
  680.     40  
  681.     41  typedef union
  682.     42  {
  683.     43  int value;
  684.     44  struct
  685.     45  {
  686.     46  unsigned int wimpcolour : 4;
  687.     47  unsigned int gcolaction : 3;
  688.     48  unsigned int foreback : 1;
  689.     49  unsigned int padding : 24;
  690.     50  } data;
  691.     51  } wimp_colour;
  692.     52  typedef union
  693.     53  {
  694.     54  int value;
  695.     55  struct
  696.     56  {
  697.     57  char gcol;
  698.     58  char red;
  699.     59  char green;
  700.     60  char blue;
  701.     61  } data;
  702.     62  } palette_entry;
  703.     63  typedef struct
  704.     64  {
  705.     65  palette_entry colour[16];
  706.     66  palette_entry border;
  707.     67  palette_entry mouse1;
  708.     68  palette_entry mouse2;
  709.     69  palette_entry mouse3;
  710.     70  } palette_block;
  711.     71  
  712.     72  
  713.     73  
  714.     74  
  715.     75  
  716.     76  
  717.     77  
  718.     78  
  719.     79  
  720.     80  
  721.     81  
  722.     82  
  723.     83  
  724.     84  
  725.     85  
  726.     86  
  727.     87  
  728.     88  
  729.     89  
  730.     90  
  731.     91  
  732.     92  
  733.     93  
  734.     94  
  735.     95  
  736.     96  
  737.     97  
  738.     98  
  739.     99  
  740.    100  
  741.    101  
  742.    102  
  743.    103  
  744.    104  
  745.    105  
  746.    106  
  747.    107  
  748.    108  
  749.    109  
  750.    110  
  751.    111  
  752.    112  
  753.    113  
  754.    114  
  755.    115  
  756.    116  
  757.    117  
  758.    118  typedef union
  759.    119  {
  760.    120  unsigned int value;
  761.    121  struct
  762.    122  {
  763.    123  unsigned int garbage1 : 6; 
  764.    124  unsigned int font : 1; 
  765.    125  unsigned int garbage2 : 17; 
  766.    126  unsigned int handle : 8; 
  767.    127  } font;
  768.    128  struct
  769.    129  {
  770.    130  unsigned int text : 1;
  771.    131  unsigned int sprite : 1;
  772.    132  unsigned int border : 1;
  773.    133  unsigned int hcentre : 1;
  774.    134  unsigned int vcentre : 1;
  775.    135  unsigned int filled : 1;
  776.    136  unsigned int font : 1;
  777.    137  unsigned int needshelp : 1;
  778.    138  unsigned int indirected : 1;
  779.    139  unsigned int rightjustify : 1;
  780.    140  unsigned int allowadjust : 1;
  781.    141  unsigned int halfsize : 1;
  782.    142  unsigned int buttontype : 4;
  783.    143  unsigned int esg : 5;
  784.    144  unsigned int selected : 1;
  785.    145  unsigned int shaded : 1;
  786.    146  unsigned int deleted : 1;
  787.    147  unsigned int foreground : 4;
  788.    148  unsigned int background : 4;
  789.    149  } data;
  790.    150  } icon_flags;
  791.    151  typedef struct
  792.    152  {
  793.    153  char *buffer;
  794.    154  char *validstring;
  795.    155  unsigned int bufflen;
  796.    156  } icon_indtext;
  797.    157  typedef struct
  798.    158  {
  799.    159  const char *name;
  800.    160  void *spritearea;
  801.    161  unsigned int nameisname;
  802.    162  } icon_indsprite;
  803.    163  typedef union
  804.    164  {
  805.    165  char text[ 12 ];
  806.    166  icon_indtext indirecttext;
  807.    167  char spritename[ 12 ];
  808.    168  icon_indsprite indirectsprite;
  809.    169  } icon_data;
  810.    170  typedef struct
  811.    171  {
  812.    172  wimp_box workarearect;
  813.    173  icon_flags flags;
  814.    174  icon_data data;
  815.    175  } icon_block;
  816.    176  typedef struct
  817.    177  {
  818.    178  window_handle window;
  819.    179  icon_block icondata;
  820.    180  } icon_createblock;
  821.    181  typedef union
  822.    182  {
  823.    183  struct
  824.    184  {
  825.    185  unsigned int hastitle : 1; 
  826.    186  unsigned int moveable : 1; 
  827.    187  unsigned int hasvscroll : 1; 
  828.    188  unsigned int hashscroll : 1; 
  829.    189  unsigned int autoredraw : 1; 
  830.    190  unsigned int pane : 1; 
  831.    191  unsigned int nobounds : 1; 
  832.    192  unsigned int nobackclose : 1; 
  833.    193  unsigned int scrollrq : 1;
  834.    194  unsigned int scrollrqdebounced : 1;
  835.    195  unsigned int realcolours : 1;
  836.    196  unsigned int backwindow : 1;
  837.    197  unsigned int hotkeys : 1;
  838.    198  unsigned int keeponscreen : 1;
  839.    199  unsigned int ignoreright : 1;
  840.    200  unsigned int ignorebottom : 1;
  841.    201  unsigned int open : 1;
  842.    202  unsigned int top : 1;
  843.    203  unsigned int fullsize : 1;
  844.    204  unsigned int istoggling : 1;
  845.    205  unsigned int focus : 1;
  846.    206  unsigned int forceonce : 1;
  847.    207  unsigned int dummy22 : 1;
  848.    208  unsigned int dummy23 : 1;
  849.    209  unsigned int backicon : 1;
  850.    210  unsigned int closeicon : 1;
  851.    211  unsigned int titlebar : 1;
  852.    212  unsigned int toggleicon : 1;
  853.    213  unsigned int vscroll : 1;
  854.    214  unsigned int adjusticon : 1;
  855.    215  unsigned int hscroll : 1;
  856.    216  unsigned int newflags : 1; 
  857.    217  } data;
  858.    218  int value;
  859.    219  } window_flags;
  860.    220  typedef struct 
  861.    221  { 
  862.    222  int x : 16; 
  863.    223  int y : 16; 
  864.    224  } window_minsize;
  865.    225  typedef enum
  866.    226  {
  867.    227  windowcol_TITLEFORE = 0,
  868.    228  windowcol_TITLEBACK,
  869.    229  windowcol_WORKFORE,
  870.    230  windowcol_WORKBACK,
  871.    231  windowcol_SCROLLBACK,
  872.    232  windowcol_SCROLLFORE,
  873.    233  windowcol_TITLEHILITE
  874.    234  } window_colourindices;
  875.    235  typedef struct
  876.    236  {
  877.    237  wimp_box screenrect;
  878.    238  wimp_point scroll;
  879.    239  window_handle behind;
  880.    240  window_flags flags;
  881.    241  char colours[8];
  882.    242  wimp_box workarearect;
  883.    243  icon_flags titleflags;
  884.    244  icon_flags workflags;
  885.    245  void *spritearea;
  886.    246  window_minsize minsize;
  887.    247  icon_data title;
  888.    248  unsigned int numicons;
  889.    249  } window_block;
  890.    250  typedef struct
  891.    251  {
  892.    252  window_handle window;
  893.    253  wimp_box screenrect;
  894.    254  wimp_point scroll;
  895.    255  window_handle behind;
  896.    256  } window_openblock;
  897.    257  typedef struct
  898.    258  {
  899.    259  window_openblock openblock;
  900.    260  window_flags flags;
  901.    261  } window_state;
  902.    262  typedef struct
  903.    263  {
  904.    264  window_handle window;
  905.    265  window_block block;
  906.    266  } window_info;
  907.    267  typedef struct
  908.    268  {
  909.    269  window_handle window;
  910.    270  wimp_box rect;
  911.    271  wimp_point scroll;
  912.    272  wimp_box cliprect;
  913.    273  } window_redrawblock;
  914.    274  typedef struct
  915.    275  {
  916.    276  window_handle window;
  917.    277  wimp_box screenrect;
  918.    278  } window_outline;
  919.    279  
  920.    280  
  921.    281  
  922.    282  
  923.    283  
  924.    284  
  925.    285  
  926.    286  typedef union
  927.    287  {
  928.    288  unsigned int value;
  929.    289  struct
  930.    290  {
  931.    291  unsigned int adjust : 1;
  932.    292  unsigned int menu : 1;
  933.    293  unsigned int select : 1;
  934.    294  unsigned int dummy3 : 1;
  935.    295  unsigned int dragadjust : 1;
  936.    296  unsigned int dummy5 : 1;
  937.    297  unsigned int dragselect : 1;
  938.    298  unsigned int dummy7 : 1;
  939.    299  unsigned int clickadjust : 1;
  940.    300  unsigned int dummy9 : 1;
  941.    301  unsigned int clickselect : 1;
  942.    302  } data;
  943.    303  } button_state;
  944.    304  typedef struct
  945.    305  {
  946.    306  wimp_point pos;
  947.    307  button_state button;
  948.    308  window_handle window;
  949.    309  icon_handle icon;
  950.    310  } mouse_block;
  951.    311  typedef struct
  952.    312  {
  953.    313  int shapenumber;
  954.    314  char *shapedata;
  955.    315  unsigned int width;
  956.    316  unsigned int height;
  957.    317  wimp_point active;
  958.    318  } pointer_shapeblock;
  959.    319  typedef enum
  960.    320  {
  961.    321  drag_MOVEWINDOW = 1,
  962.    322  drag_RESIZEWINDOW,
  963.    323  drag_SCROLLX,
  964.    324  drag_SCROLLY,
  965.    325  drag_FIXEDBOX,
  966.    326  drag_RUBBERBOX,
  967.    327  drag_INVISIBLE,
  968.    328  drag_USERFIXEDBBOX,
  969.    329  drag_USERRUBBERBOX,
  970.    330  drag_USERFIXEDNC,
  971.    331  drag_USERRUBBERNC
  972.    332  } drag_type;
  973.    333  typedef struct
  974.    334  {
  975.    335  window_handle window;
  976.    336  drag_type type;
  977.    337  wimp_box screenrect;
  978.    338  wimp_box parent;
  979.    339  } drag_block;
  980.    340  typedef union
  981.    341  {
  982.    342  unsigned int value;
  983.    343  struct
  984.    344  {
  985.    345  unsigned int ok : 1;
  986.    346  unsigned int cancel : 1;
  987.    347  unsigned int highlightcancel : 1;
  988.    348  unsigned int noprompt : 1;
  989.    349  unsigned int noprefix : 1;
  990.    350  unsigned int nowait : 1;
  991.    351  unsigned int closebox : 1;
  992.    352  } data;
  993.    353  } error_flags;
  994.    354  typedef struct menu_block *menu_ptr;
  995.    355  typedef union
  996.    356  {
  997.    357  unsigned int value;
  998.    358  struct
  999.    359  {
  1000.    360  unsigned int ticked : 1;
  1001.    361  unsigned int dotted : 1;
  1002.    362  unsigned int writable : 1;
  1003.    363  unsigned int notifysub : 1;
  1004.    364  unsigned int openshaded : 1;
  1005.    365  unsigned int dummy2 : 2;
  1006.    366  unsigned int last : 1;
  1007.    367  unsigned int indtitle : 1;
  1008.    368  unsigned int dummy13 : 13;
  1009.    369  unsigned int shaded : 1;
  1010.    370  unsigned int dummy1 : 1;
  1011.    371  unsigned int foreground : 4;
  1012.    372  unsigned int background : 4;
  1013.    373  } data;
  1014.    374  } menu_flags;
  1015.    375  typedef union
  1016.    376  {
  1017.    377  menu_ptr menu;
  1018.    378  window_handle window;
  1019.    379  int value;
  1020.    380  } menu_submenu;
  1021.    381  typedef struct
  1022.    382  {
  1023.    383  menu_flags menuflags;
  1024.    384  menu_submenu submenu;
  1025.    385  icon_flags iconflags;
  1026.    386  icon_data icondata;
  1027.    387  } menu_item;
  1028.    388  typedef struct menu_block
  1029.    389  {
  1030.    390  char title [ 12 ];
  1031.    391  char titlefore, titleback, workfore, workback;
  1032.    392  unsigned int width;
  1033.    393  unsigned int height;
  1034.    394  unsigned int gap;
  1035.    395  } menu_block;
  1036.    396  typedef int key_press;
  1037.    397  typedef struct
  1038.    398  {
  1039.    399  window_handle window;
  1040.    400  icon_handle icon;
  1041.    401  wimp_point offset;
  1042.    402  int height;
  1043.    403  int index;
  1044.    404  } caret_block;
  1045.    405  typedef struct
  1046.    406  {
  1047.    407  caret_block caret;
  1048.    408  key_press code;
  1049.    409  } key_block;
  1050.    410  typedef struct
  1051.    411  {
  1052.    412  int address;
  1053.    413  int contents;
  1054.    414  } pollword_block;
  1055.    415  typedef enum
  1056.    416  {
  1057.    417  message_QUIT = 0,
  1058.    418  message_CLOSEDOWN = 0,
  1059.    419  message_DATASAVE = 1,
  1060.    420  message_DATASAVEACK = 2,
  1061.    421  message_DATASAVEOK = 2,
  1062.    422  message_DATALOAD = 3,
  1063.    423  message_DATALOADACK = 4,
  1064.    424  message_DATALOADOK = 4,
  1065.    425  message_DATAOPEN,
  1066.    426  message_RAMFETCH,
  1067.    427  message_RAMTRANSMIT,
  1068.    428  message_PREQUIT,
  1069.    429  message_PALETTECHANGE,
  1070.    430  message_SAVEDESK,
  1071.    431  message_DEVICECLAIM,
  1072.    432  message_DEVICEINUSE,
  1073.    433  message_DATASAVED,
  1074.    434  message_FILEROPENDIR = 0x400,
  1075.    435  message_FILERCLOSEDIR,
  1076.    436  message_HELPREQUEST = 0x502,
  1077.    437  message_HELPREPLY,
  1078.    438  message_NOTIFY = 0x40040,
  1079.    439  message_MENUWARNING = 0x400C0,
  1080.    440  message_MENUWARN = 0x400C0,
  1081.    441  message_MODECHANGE,
  1082.    442  message_TASKINITIALISE = 0x400C2,
  1083.    443  message_INITTASK = 0x400C2,
  1084.    444  message_TASKCLOSEDOWN = 0x400C3,
  1085.    445  message_CLOSETASK = 0x400C3,
  1086.    446  message_SLOTSIZE = 0x400C4,
  1087.    447  message_SLOTCHANGE = 0x400C4,
  1088.    448  message_SETSLOT = 0x400C5,
  1089.    449  message_TASKNAMERQ,
  1090.    450  message_TASKNAMEIS,
  1091.    451  message_TASKSTARTED,
  1092.    452  message_MENUSDELETED, 
  1093.    453  message_WINDOWINFO = 0x400CC, 
  1094.    454  message_POPUPRQ = 0x46D40, 
  1095.    455  message_POPUPREQUEST = 0x46D40,
  1096.    456  message_POPUPSTATE,
  1097.    457  message_POPUPCLOSED,
  1098.    458  message_PRINTFILE = 0x80140,
  1099.    459  message_WILLPRINT,
  1100.    460  message_PRINTTYPEODD = 0x80145,
  1101.    461  message_PRINTTYPEKNOWN,
  1102.    462  message_PRINTERCHANGE
  1103.    463  } message_action;
  1104.    464  typedef int message_destinee; 
  1105.    465  typedef struct
  1106.    466  {
  1107.    467  unsigned int size;
  1108.    468  task_handle sender;
  1109.    469  unsigned int myref;
  1110.    470  unsigned int yourref;
  1111.    471  message_action action;
  1112.    472  } message_header;
  1113.    473  typedef struct
  1114.    474  {
  1115.    475  window_handle window;
  1116.    476  icon_handle icon;
  1117.    477  wimp_point pos;
  1118.    478  int estsize;
  1119.    479  int filetype;
  1120.    480  char leafname[12];
  1121.    481  } message_datasave;
  1122.    482  typedef struct
  1123.    483  {
  1124.    484  window_handle window; 
  1125.    485  icon_handle icon; 
  1126.    486  wimp_point pos;
  1127.    487  int estsize;
  1128.    488  int filetype;
  1129.    489  char filename[212];
  1130.    490  } message_datasaveack;
  1131.    491  typedef struct
  1132.    492  {
  1133.    493  window_handle window;
  1134.    494  icon_handle icon;
  1135.    495  wimp_point pos;
  1136.    496  int size;
  1137.    497  int filetype;
  1138.    498  char filename[212];
  1139.    499  } message_dataload;
  1140.    500  typedef struct 
  1141.    501  {
  1142.    502  window_handle window;
  1143.    503  icon_handle icon;
  1144.    504  wimp_point pos;
  1145.    505  int size;
  1146.    506  int filetype;
  1147.    507  char filename[212];
  1148.    508  } message_dataloadack;
  1149.    509  typedef message_dataload message_dataopen;
  1150.    510  typedef struct
  1151.    511  {
  1152.    512  char *buffer;
  1153.    513  int buffsize;
  1154.    514  } message_ramfetch;
  1155.    515  typedef struct
  1156.    516  {
  1157.    517  char *buffer; 
  1158.    518  int byteswritten;
  1159.    519  } message_ramtransmit;
  1160.    520  typedef struct
  1161.    521  {
  1162.    522  mouse_block where; 
  1163.    523  } message_helprequest;
  1164.    524  typedef struct
  1165.    525  {
  1166.    526  char text[200];
  1167.    527  } message_helpreply;
  1168.    528  typedef struct
  1169.    529  {
  1170.    530  int filler[5];
  1171.    531  int filetype;
  1172.    532  char filename[212];
  1173.    533  } message_print;
  1174.    534  typedef struct
  1175.    535  {
  1176.    536  int id; 
  1177.    537  wimp_point openpos; 
  1178.    538  int selection[10]; 
  1179.    539  } message_menuwarn;
  1180.    540  typedef struct
  1181.    541  {
  1182.    542  window_handle window;
  1183.    543  task_handle task;
  1184.    544  char title[20];
  1185.    545  } message_iconize;
  1186.    546  typedef struct
  1187.    547  {
  1188.    548  window_handle window;
  1189.    549  int dummy;
  1190.    550  char spritename[8];
  1191.    551  char title[20];
  1192.    552  } message_windowinfo;
  1193.    553  typedef struct
  1194.    554  {
  1195.    555  message_header header;
  1196.    556  union
  1197.    557  {
  1198.    558  char bytes [236];
  1199.    559  int words [59];
  1200.    560  message_datasave datasave;
  1201.    561  message_datasaveack datasaveack;
  1202.    562  message_dataload dataload;
  1203.    563  message_dataopen dataopen;
  1204.    564  message_ramfetch ramfetch;
  1205.    565  message_ramtransmit ramtransmit;
  1206.    566  message_helprequest helprequest;
  1207.    567  message_helpreply helpreply;
  1208.    568  message_print print;
  1209.    569  message_menuwarn menuwarn;
  1210.    570  message_iconize iconize;
  1211.    571  message_windowinfo windowinfo;
  1212.    572   0 
  1213.    573  
  1214.    573  
  1215.    574  
  1216.    575  
  1217.    576  } data;
  1218.    577  } message_block;
  1219.    578  
  1220.    579  typedef enum
  1221.    580  {
  1222.    581  event_ANY = -99, 
  1223.    582  event_NULL = 0,
  1224.    583  event_REDRAW,
  1225.    584  event_OPEN,
  1226.    585  event_CLOSE,
  1227.    586  event_PTRLEAVE,
  1228.    587  event_PTRENTER,
  1229.    588  event_CLICK = 6,
  1230.    589  event_BUTTON = 6,
  1231.    590  event_USERDRAG,
  1232.    591  event_KEY,
  1233.    592  event_MENU,
  1234.    593  event_SCROLL,
  1235.    594  event_LOSECARET,
  1236.    595  event_GAINCARET,
  1237.    596  event_NONZEROPOLLWORD,
  1238.    597  event_USERMESSAGE = 17,
  1239.    598  event_SEND = 17,
  1240.    599  event_USERMESSAGERECORDED = 18,
  1241.    600  event_SENDWANTACK = 18,
  1242.    601  event_USERMESSAGEACK = 19,
  1243.    602  event_ACK = 19
  1244.    603  } event_type;
  1245.    604  typedef union
  1246.    605  {
  1247.    606  unsigned int value;
  1248.    607  struct
  1249.    608  {
  1250.    609  unsigned int null : 1;
  1251.    610  unsigned int redraw : 1;
  1252.    611  unsigned int open : 1;
  1253.    612  unsigned int close : 1;
  1254.    613  unsigned int ptrleave : 1;
  1255.    614  unsigned int ptrenter : 1;
  1256.    615  unsigned int click : 1;
  1257.    616  unsigned int userdrag : 1;
  1258.    617  unsigned int key : 1;
  1259.    618  unsigned int menu : 1;
  1260.    619  unsigned int scroll : 1;
  1261.    620  unsigned int losecaret : 1;
  1262.    621  unsigned int gaincaret : 1;
  1263.    622  unsigned int nonzeropollword : 1;
  1264.    623  unsigned int dummy14 : 1;
  1265.    624  unsigned int dummy15 : 1;
  1266.    625  unsigned int dummy16 : 1;
  1267.    626  unsigned int usermessage : 1;
  1268.    627  unsigned int usermessagerecorded : 1;
  1269.    628  unsigned int usermessageack : 1;
  1270.    629  unsigned int dummy20 : 1;
  1271.    630  unsigned int dummy21 : 1;
  1272.    631  unsigned int r3ispollwordptr : 1;
  1273.    632  unsigned int highprioritypoll : 1;
  1274.    633  unsigned int keepfpregisters : 1;
  1275.    634  } data;
  1276.    635  } event_pollmask;
  1277.    636  typedef struct
  1278.    637  {
  1279.    638  window_openblock openblock;
  1280.    639  wimp_point direction;
  1281.    640  } scroll_rq;
  1282.    641  typedef union
  1283.    642  {
  1284.    643  caret_block caret;
  1285.    644  key_block key;
  1286.    645  pollword_block pollword;
  1287.    646  window_openblock openblock;
  1288.    647  message_block message;
  1289.    648  mouse_block mouse;
  1290.    649  wimp_box screenrect;
  1291.    650  int selection[10];
  1292.    651  scroll_rq scroll;
  1293.    652  char bytes [256];
  1294.    653  int words [64];
  1295.    654  } event_data;
  1296.    655  typedef struct
  1297.    656  {
  1298.    657  event_type type;
  1299.    658  event_data data;
  1300.    659  } event_pollblock;
  1301.    660  typedef struct
  1302.    661  {
  1303.    662  char fonts[256];
  1304.    663  } font_array;
  1305.    664  typedef struct
  1306.    665  {
  1307.    666  window_block *buffer;
  1308.    667  char *workfree;
  1309.    668  char *workend;
  1310.    669  font_array *font;
  1311.    670  char *name;
  1312.    671  unsigned int index;
  1313.    672  } template_block;
  1314.    673  typedef struct
  1315.    674  {
  1316.    675  wimp_point mul;
  1317.    676  wimp_point div;
  1318.    677  } scale_block;
  1319.    678  
  1320.    679   
  1321.      2  
  1322.      3  
  1323.      4  
  1324.      5  
  1325.      6  
  1326.      7  
  1327.      8  
  1328.     10  os_error *SWI(int numregsin, int numregsout, int swicode, ... );
  1329.     11  
  1330.     12  
  1331.     13  
  1332.     14  
  1333.     15  
  1334.     16  
  1335.     17  
  1336.     18  
  1337.     19  
  1338.     20  
  1339.     21  
  1340.     22  
  1341.     23  
  1342.     24  
  1343.     25  
  1344.     26  
  1345.     27  
  1346.     28  
  1347.     29  
  1348.     30  
  1349.     31  
  1350.     32  
  1351.     33  
  1352.     34  
  1353.     35  
  1354.     36  
  1355.     37  
  1356.     38  
  1357.     39  
  1358.     40  
  1359.     41  
  1360.     42  
  1361.     43  
  1362.     44  
  1363.     45  
  1364.     46  
  1365.     47  
  1366.     48  
  1367.     49  
  1368.     50  
  1369.     51  
  1370.     52  
  1371.     53  
  1372.     54  
  1373.     55  
  1374.     56  
  1375.     57  
  1376.     58  
  1377.     59  
  1378.     60  
  1379.     61  
  1380.     62  
  1381.     63  
  1382.     64  
  1383.     65  
  1384.     66  
  1385.     67  
  1386.     68  
  1387.     69  
  1388.     70  
  1389.     71  
  1390.     72  
  1391.     73  
  1392.     74  
  1393.     75  
  1394.     76  
  1395.     77  
  1396.     78  
  1397.     79  
  1398.     80  
  1399.     81  
  1400.     82  
  1401.     83  
  1402.     84  
  1403.     85  
  1404.     86  
  1405.     87  
  1406.     88  
  1407.     89  
  1408.     90  
  1409.     91  
  1410.     92  
  1411.     93  
  1412.     94  
  1413.     95  
  1414.     96  
  1415.     97  
  1416.     98  
  1417.     99  
  1418.    100  
  1419.    101  
  1420.    102  
  1421.    103  
  1422.    104  
  1423.    105  
  1424.    106  
  1425.    107  
  1426.    108  
  1427.    109  
  1428.    110  
  1429.    111  
  1430.    112  
  1431.    113  
  1432.    114  
  1433.    115  
  1434.    116  
  1435.    117  
  1436.    118  
  1437.    119  
  1438.    120  
  1439.    121  
  1440.    122  
  1441.    123  
  1442.    124  
  1443.    125  
  1444.    126  
  1445.    127  
  1446.    128  
  1447.    129  
  1448.    130  
  1449.    131  
  1450.    132  
  1451.    133  
  1452.    134  
  1453.    135  
  1454.    136  
  1455.    137  
  1456.    138  
  1457.    139  
  1458.    140  
  1459.    141  
  1460.    142  
  1461.    143  
  1462.    144  
  1463.    145  
  1464.    146  
  1465.    147  
  1466.    148  
  1467.    149  
  1468.    150  
  1469.    151  
  1470.    152  
  1471.    153  
  1472.    154  
  1473.    155  
  1474.    156  
  1475.    157  
  1476.    158  
  1477.    159  
  1478.    160  
  1479.    161  
  1480.    162  
  1481.    163  
  1482.    164  
  1483.    165  
  1484.    166  
  1485.    167  
  1486.    168  
  1487.    169  
  1488.    170  
  1489.    171  
  1490.    172  
  1491.    173  
  1492.    174  
  1493.    175  
  1494.    176  
  1495.    177  
  1496.    178  
  1497.    179  
  1498.    180  
  1499.    181  
  1500.    182  
  1501.    183  
  1502.    184  
  1503.    185  
  1504.    186  
  1505.    187  
  1506.    188  
  1507.    189  
  1508.    190  
  1509.    191  
  1510.    192  
  1511.    193  
  1512.    194  
  1513.    195  
  1514.    196  
  1515.    197  
  1516.    198  
  1517.    199  
  1518.    200  
  1519.    201  
  1520.    202  
  1521.    203  
  1522.    204  
  1523.    205  
  1524.    206  
  1525.    207  
  1526.    208  
  1527.    209  
  1528.    210  
  1529.    211  
  1530.    212  
  1531.    213  
  1532.    214  
  1533.    215  
  1534.    216  
  1535.    217  
  1536.    218  
  1537.    219  
  1538.    220  
  1539.    221  
  1540.    222  
  1541.    223  
  1542.    224  
  1543.    225  
  1544.    226  
  1545.    227  
  1546.    228  
  1547.    229  
  1548.    230  
  1549.    231  
  1550.    232  
  1551.    233  
  1552.    234  
  1553.    235  
  1554.    236  
  1555.    237  
  1556.    238  
  1557.    239  
  1558.    240  
  1559.    241  
  1560.    242  
  1561.    243  
  1562.    244  
  1563.    245  
  1564.    246  
  1565.    247  
  1566.    248  
  1567.    249  
  1568.    250  
  1569.    251  
  1570.    252  
  1571.    253  
  1572.     20   
  1573.     24  
  1574.     24  
  1575.     24  
  1576.     24   
  1577.      2  
  1578.      3  
  1579.      4  
  1580.      6  
  1581.      7  extern int *Screen__Ref_mode( void);
  1582.      8  extern wimp_point *Screen__Ref_size( void);
  1583.      9  extern wimp_point *Screen__Ref_eig( void);
  1584.     10  extern wimp_point *Screen__Ref_delta( void);
  1585.     11  extern int *Screen__Ref_bpp( void);
  1586.     12  
  1587.     13   0  || (  1  && ! 1 )
  1588.     14  
  1589.     14  
  1590.     15  
  1591.     16  
  1592.     17  
  1593.     18  
  1594.     19  
  1595.     20  extern int screen_mode;
  1596.     21  extern wimp_point screen_size;
  1597.     22  extern wimp_point screen_eig;
  1598.     23  extern wimp_point screen_delta;
  1599.     24  extern int screen_bpp;
  1600.     25  
  1601.     26  extern  unsigned  Screen_CacheModeInfo(void);
  1602.     27  
  1603.     28  
  1604.     26  
  1605.     27  int        screen_mode  = -1;
  1606.     28  wimp_point screen_size;
  1607.     29  wimp_point screen_eig;
  1608.     30  wimp_point screen_delta;
  1609.     31  int        screen_bpp;
  1610.     32  
  1611.     33  
  1612.     34  int        *Screen__Ref_mode( void)    { return &screen_mode;    }
  1613.     35  wimp_point    *Screen__Ref_size( void)    { return &screen_size;    }
  1614.     36  wimp_point    *Screen__Ref_eig( void)        { return &screen_eig;    }
  1615.     37  wimp_point    *Screen__Ref_delta( void)    { return &screen_delta;    }
  1616.     38  int        *Screen__Ref_bpp( void)        { return &screen_bpp;    }
  1617.     39  
  1618.     40  
  1619.     41  
  1620.     42  
  1621.     43  
  1622.     44  
  1623.     45  
  1624.     46  
  1625.     47  extern  unsigned  Screen_CacheModeInfo(void)
  1626.     48  {
  1627.     49    int oldmode = screen_mode;
  1628.     50  
  1629.     51    SWI(1, 3,  0x20006 , 135,    0 ,  0 , &screen_mode);
  1630.     52  
  1631.     53    if (oldmode == screen_mode)
  1632.     54      return( 0 );
  1633.     55  
  1634.     56     SWI(3, 3, 0x20035, ( -1 ), ( 9 ), 0, 0, 0, ( &screen_bpp )) ;
  1635.     57    screen_bpp = 1 << screen_bpp;
  1636.     58  
  1637.     59     SWI(3, 3, 0x20035, ( -1 ), ( 4 ), 0, 0, 0, ( &screen_eig.x )) ;
  1638.     60     SWI(3, 3, 0x20035, ( -1 ), ( 5 ), 0, 0, 0, ( &screen_eig.y )) ;
  1639.     61  
  1640.     62    screen_delta.x = 1 << screen_eig.x;
  1641.     63    screen_delta.y = 1 << screen_eig.y;
  1642.     64  
  1643.     65     SWI(3, 3, 0x20035, ( -1 ), ( 11 ), 0, 0, 0, ( &screen_size.x )) ;
  1644.     66    screen_size.x = (screen_size.x + 1) << screen_eig.x;
  1645.     67  
  1646.     68     SWI(3, 3, 0x20035, ( -1 ), ( 12 ), 0, 0, 0, ( &screen_size.y )) ;
  1647.     69    screen_size.y = (screen_size.y + 1) << screen_eig.y;
  1648.     70  
  1649.     71    return( 1 );
  1650.     72  }
  1651.     73  
  1652.